Optimal. Leaf size=62 \[ \frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {a^2 A c^2 \tan (e+f x)}{f}+\frac {a^2 A c^2 \tan ^3(e+f x)}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 74, 655}
\begin {gather*} \frac {a^2 A c^2 \tan ^3(e+f x)}{3 f}+\frac {a^2 A c^2 \tan (e+f x)}{f}+\frac {a^2 B c^2 \sec ^4(e+f x)}{4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 74
Rule 655
Rule 3669
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx &=\frac {(a c) \text {Subst}(\int (a+i a x) (A+B x) (c-i c x) \, dx,x,\tan (e+f x))}{f}\\ &=\frac {(a c) \text {Subst}\left (\int (A+B x) \left (a c+a c x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {(a A c) \text {Subst}\left (\int \left (a c+a c x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {a^2 A c^2 \tan (e+f x)}{f}+\frac {a^2 A c^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 53, normalized size = 0.85 \begin {gather*} \frac {a^2 B c^2 \sec ^4(e+f x)}{4 f}+\frac {a^2 A c^2 \left (\tan (e+f x)+\frac {1}{3} \tan ^3(e+f x)\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 53, normalized size = 0.85
method | result | size |
derivativedivides | \(\frac {c^{2} a^{2} \left (\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{4}+\frac {A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(53\) |
default | \(\frac {c^{2} a^{2} \left (\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{4}+\frac {A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f}\) | \(53\) |
risch | \(\frac {4 c^{2} a^{2} \left (3 i A \,{\mathrm e}^{4 i \left (f x +e \right )}+3 B \,{\mathrm e}^{4 i \left (f x +e \right )}+4 i A \,{\mathrm e}^{2 i \left (f x +e \right )}+i A \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{4}}\) | \(68\) |
norman | \(\frac {a^{2} A \,c^{2} \tan \left (f x +e \right )}{f}+\frac {B \,a^{2} c^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}+\frac {B \,a^{2} c^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {a^{2} A \,c^{2} \left (\tan ^{3}\left (f x +e \right )\right )}{3 f}\) | \(79\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 76, normalized size = 1.23 \begin {gather*} \frac {3 \, B a^{2} c^{2} \tan \left (f x + e\right )^{4} + 4 \, A a^{2} c^{2} \tan \left (f x + e\right )^{3} + 6 \, B a^{2} c^{2} \tan \left (f x + e\right )^{2} + 12 \, A a^{2} c^{2} \tan \left (f x + e\right )}{12 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 2.99, size = 111, normalized size = 1.79 \begin {gather*} -\frac {4 \, {\left (3 \, {\left (-i \, A - B\right )} a^{2} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} - 4 i \, A a^{2} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, A a^{2} c^{2}\right )}}{3 \, {\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 0.32, size = 160, normalized size = 2.58 \begin {gather*} \frac {16 i A a^{2} c^{2} e^{2 i e} e^{2 i f x} + 4 i A a^{2} c^{2} + \left (12 i A a^{2} c^{2} e^{4 i e} + 12 B a^{2} c^{2} e^{4 i e}\right ) e^{4 i f x}}{3 f e^{8 i e} e^{8 i f x} + 12 f e^{6 i e} e^{6 i f x} + 18 f e^{4 i e} e^{4 i f x} + 12 f e^{2 i e} e^{2 i f x} + 3 f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 411 vs.
\(2 (61) = 122\).
time = 0.69, size = 411, normalized size = 6.63 \begin {gather*} \frac {3 \, B a^{2} c^{2} \tan \left (f x\right )^{4} \tan \left (e\right )^{4} - 12 \, A a^{2} c^{2} \tan \left (f x\right )^{4} \tan \left (e\right )^{3} - 12 \, A a^{2} c^{2} \tan \left (f x\right )^{3} \tan \left (e\right )^{4} + 6 \, B a^{2} c^{2} \tan \left (f x\right )^{4} \tan \left (e\right )^{2} + 6 \, B a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right )^{4} - 4 \, A a^{2} c^{2} \tan \left (f x\right )^{4} \tan \left (e\right ) + 24 \, A a^{2} c^{2} \tan \left (f x\right )^{3} \tan \left (e\right )^{2} + 24 \, A a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right )^{3} - 4 \, A a^{2} c^{2} \tan \left (f x\right ) \tan \left (e\right )^{4} + 3 \, B a^{2} c^{2} \tan \left (f x\right )^{4} + 12 \, B a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right )^{2} + 3 \, B a^{2} c^{2} \tan \left (e\right )^{4} + 4 \, A a^{2} c^{2} \tan \left (f x\right )^{3} - 24 \, A a^{2} c^{2} \tan \left (f x\right )^{2} \tan \left (e\right ) - 24 \, A a^{2} c^{2} \tan \left (f x\right ) \tan \left (e\right )^{2} + 4 \, A a^{2} c^{2} \tan \left (e\right )^{3} + 6 \, B a^{2} c^{2} \tan \left (f x\right )^{2} + 6 \, B a^{2} c^{2} \tan \left (e\right )^{2} + 12 \, A a^{2} c^{2} \tan \left (f x\right ) + 12 \, A a^{2} c^{2} \tan \left (e\right ) + 3 \, B a^{2} c^{2}}{12 \, {\left (f \tan \left (f x\right )^{4} \tan \left (e\right )^{4} - 4 \, f \tan \left (f x\right )^{3} \tan \left (e\right )^{3} + 6 \, f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 4 \, f \tan \left (f x\right ) \tan \left (e\right ) + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.49, size = 82, normalized size = 1.32 \begin {gather*} \frac {a^2\,c^2\,\sin \left (e+f\,x\right )\,\left (12\,A\,{\cos \left (e+f\,x\right )}^3+6\,B\,{\cos \left (e+f\,x\right )}^2\,\sin \left (e+f\,x\right )+4\,A\,\cos \left (e+f\,x\right )\,{\sin \left (e+f\,x\right )}^2+3\,B\,{\sin \left (e+f\,x\right )}^3\right )}{12\,f\,{\cos \left (e+f\,x\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________